/*
 *      Copyright (c) 2018-2028, Joffee All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Joffee
 */
package com.sailmi.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Objects;

/**
 * 行政区划表实体类
 *
 * @author Joffee
 */

@TableName("ucs_region")
@Schema(name = "Region对象", description = "行政区划表")
public class Region implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 区划编号
	 */
	@TableId(value = "code", type = IdType.INPUT)
	@Schema(name = "区划编号")
	private String code;
	/**
	 * 父区划编号
	 */
	@Schema(name = "父区划编号")
	private String parentCode;
	/**
	 * 祖区划编号
	 */
	@Schema(name = "祖区划编号")
	private String ancestors;
	/**
	 * 区划名称
	 */
	@Schema(name = "区划名称")
	private String name;
	/**
	 * 省级区划编号
	 */
	@Schema(name = "省级区划编号")
	private String provinceCode;
	/**
	 * 省级名称
	 */
	@Schema(name = "省级名称")
	private String provinceName;
	/**
	 * 市级区划编号
	 */
	@Schema(name = "市级区划编号")
	private String cityCode;
	/**
	 * 市级名称
	 */
	@Schema(name = "市级名称")
	private String cityName;
	/**
	 * 区级区划编号
	 */
	@Schema(name = "区级区划编号")
	private String districtCode;
	/**
	 * 区级名称
	 */
	@Schema(name = "区级名称")
	private String districtName;
	/**
	 * 镇级区划编号
	 */
	@Schema(name = "镇级区划编号")
	private String townCode;
	/**
	 * 镇级名称
	 */
	@Schema(name = "镇级名称")
	private String townName;
	/**
	 * 村级区划编号
	 */
	@Schema(name = "村级区划编号")
	private String villageCode;
	/**
	 * 村级名称
	 */
	@Schema(name = "村级名称")
	private String villageName;
	/**
	 * 层级
	 */
	@Schema(name = "层级")
	private Integer level;
	/**
	 * 排序
	 */
	@Schema(name = "排序")
	private Integer sort;
	/**
	 * 备注
	 */
	@Schema(name = "备注")
	private String remark;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getParentCode() {
		return parentCode;
	}

	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}

	public String getAncestors() {
		return ancestors;
	}

	public void setAncestors(String ancestors) {
		this.ancestors = ancestors;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getProvinceCode() {
		return provinceCode;
	}

	public void setProvinceCode(String provinceCode) {
		this.provinceCode = provinceCode;
	}

	public String getProvinceName() {
		return provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public String getDistrictCode() {
		return districtCode;
	}

	public void setDistrictCode(String districtCode) {
		this.districtCode = districtCode;
	}

	public String getDistrictName() {
		return districtName;
	}

	public void setDistrictName(String districtName) {
		this.districtName = districtName;
	}

	public String getTownCode() {
		return townCode;
	}

	public void setTownCode(String townCode) {
		this.townCode = townCode;
	}

	public String getTownName() {
		return townName;
	}

	public void setTownName(String townName) {
		this.townName = townName;
	}

	public String getVillageCode() {
		return villageCode;
	}

	public void setVillageCode(String villageCode) {
		this.villageCode = villageCode;
	}

	public String getVillageName() {
		return villageName;
	}

	public void setVillageName(String villageName) {
		this.villageName = villageName;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof Region region)) return false;
		return Objects.equals(code, region.code) && Objects.equals(parentCode, region.parentCode) && Objects.equals(ancestors, region.ancestors) && Objects.equals(name, region.name) && Objects.equals(provinceCode, region.provinceCode) && Objects.equals(provinceName, region.provinceName) && Objects.equals(cityCode, region.cityCode) && Objects.equals(cityName, region.cityName) && Objects.equals(districtCode, region.districtCode) && Objects.equals(districtName, region.districtName) && Objects.equals(townCode, region.townCode) && Objects.equals(townName, region.townName) && Objects.equals(villageCode, region.villageCode) && Objects.equals(villageName, region.villageName) && Objects.equals(level, region.level) && Objects.equals(sort, region.sort) && Objects.equals(remark, region.remark);
	}

	@Override
	public int hashCode() {
		return Objects.hash(code, parentCode, ancestors, name, provinceCode, provinceName, cityCode, cityName, districtCode, districtName, townCode, townName, villageCode, villageName, level, sort, remark);
	}
}
